<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>登录</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
    <div class="row" style="margin-top: 20px;">
        <div class="col-md-3">
            <h2>登陆</h2>
            <form th:action="@{/authentication/form}" method="post">
                <div class="form-group">
                    <label for="username">Username</label>
                    <input type="text" class="form-control" id="username" name="username" placeholder="Enter username">
                </div>
                <div class="form-group">
                    <label for="Password">Password:</label>
                    <input type="password" class="form-control" id="Password" name="password" placeholder="Enter password">
                </div>
                <div class="form-group">
                    <label for="imageCode">imageCode:</label>
                    <input type="text" class="form-control" id="imageCode" name="imageCode" placeholder="Enter imageCode">
                    <img src="/code/image">
                </div>
                <div class="form-group" th:if="${param.error}">
                    <p th:if="${session.SPRING_SECURITY_LAST_EXCEPTION}">
                        <p th:text="${session.SPRING_SECURITY_LAST_EXCEPTION.message}"></p>
                    </p>
                </div>
                <div class="form-check">
                    <label class="form-check-label">
                        <input class="form-check-input" name="remember-me" type="checkbox" value="true"> Remember me
                    </label>
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>
        </div>
    </div>

    <div class="row" style="margin-top: 20px;">
        <div class="col-md-3">
            <h2>短信登陆</h2>
            <form th:action="@{/authentication/mobile}" method="post">
                <div class="form-group">
                    <label for="mobile">mobile</label>
                    <input type="text" class="form-control" id="mobile" name="mobile" value="12345678910" placeholder="Enter mobile">
                </div>
                <div class="form-group">
                    <label for="smsCode">smsCode:</label>
                    <input type="text" class="form-control" id="smsCode" name="smsCode" placeholder="Enter smsCode">
                    <a href="/code/sms?mobile=12345678910">发送手机验证码</a>
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>
        </div>
    </div>

</div>

</body>
</html>